{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- 添加视口设置以优化移动端显示 -->  
    <link rel="stylesheet" href="{% static 'css/login.css' %}"> <!-- rel="stylesheet" 属性指定了被链接的文件是一个样式表;url_for是一个url链接的函数，static是同app.py的一级目录，后面跟链接的文件路径 -->
    <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}">
    <!-- <script src="{% static 'js/jquery.js' %}"></script> -->
    <script src="{% static 'js/bootstrap.min.js' %}"></script>
    <title>Hy数据可视化系统-登陆</title>
</head>
<body >
    <!--登录表单-->
    <div class="login-form">
        <h1 class="panel_title">  登录 </h1>
        <p id="mes">{{ message }}</p>
        <form class="form" method="post">
            {% csrf_token %}
            <label class="form_label" for="usernameIn">Username</label>
            <input class="form_input" type="text" id="usernameIn" name="usernameIn">
            <br>
            <label class="form_label" for="passwordIn">Password</label>
            <input class="form_input " type="password" id="passwordIn" name="passwordIn">
            <button class="form_btn" id="form_btn" type="Submit">点击登陆</button>
            <br>
            <button class="checkout-register" id="checkout-register" type="button">首次使用请注册</button>
        </form>
        
    </div>
</body>
</html>
<script>
    document.getElementById('checkout-register').addEventListener('click', function() {window.location.href = 'http://localhost:8000/register';});
    // document.getElementById('form_btn').addEventListener('click', function() {window.location.href = 'http://localhost:8000/login_form';});
</script>
